<?php

// route::match(array('GET','POST'),'/',function(){
//   echo '首页';
// });

// route::match(array('GET'),'/abcd',['uses'=>'topc_ctl_index@index']);
route::get('abc.html', [ 'middleware' => 'topc_middleware_index','as' => 'what',
'uses' => 'topc_ctl_index@index' ]);
// Route::any('/{module}/{class}/{action}', function($module, $class, $action) {
//     $ctrl = \App::make("\\App\\Http\\Controllers\\" . $module . "\\" . $class . "Controller");
//     return \App::call([$ctrl, $action]);
// });
route::group(['prefix' => 'shop', 'middleware' => 'topshop_middleware_permission'], function() {
  route::get('passport/signin.html', [ 'as' => 'topshop.signin', 'uses' => 'topshop_ctl_passport@signin', 'middleware' => 'topshop_middleware_test']);
});
/*
|--------------------------------------------------------------------------
| 后台通用route
|--------------------------------------------------------------------------
 */
route::group(array('prefix' => 'admin'), function() {

  # 系统分类
  route::match(array('GET', 'POST'), '/', array('as' => 'shopadmin', 'uses' => 'desktop_router@dispatch'));
});

array (
  'nodomain' =>
  array (
    'GET/abc.html' =>
    array (
      'method' => 'GET',
      'uri' => '/abc.html',
      'action' =>
      array (
        'middleware' =>
        array (
          0 => 'topc_middleware_index',
        ),
        'as' => 'what',
        'uses' => 'topc_ctl_index@index',
      ),
    ),
    'GET/shop/passport/signin.html' =>
    array (
      'method' => 'GET',
      'uri' => '/shop/passport/signin.html',
      'action' =>
      array (
        'as' => 'topshop.signin',
        'uses' => 'topshop_ctl_passport@signin',
        'middleware' =>
        array (
          0 => 'topshop_middleware_permission',
        ),
      ),
    ),
    'GET/admin' =>
    array (
      'method' => 'GET',
      'uri' => '/admin',
      'action' =>
      array (
        'as' => 'shopadmin',
        'uses' => 'desktop_router@dispatch',
      ),
    ),
    'POST/admin' =>
    array (
      'method' => 'POST',
      'uri' => '/admin',
      'action' =>
      array (
        'as' => 'shopadmin',
        'uses' => 'desktop_router@dispatch',
      ),
    ),
  ),
);